@import "tailwindcss";

/* 像素字体通过 layout.tsx 的 <link> 方式引入，避免 @import 位置限制 */

:root {
  --background: #0a0a0a;
  --foreground: #ededed;
  --pixel-primary: #ff6b35;
  --pixel-secondary: #f7931e;
  --pixel-accent: #ffd700;
  --pixel-dark: #1a1a1a;
  --pixel-darker: #0f0f0f;
  --pixel-light: #2a2a2a;
  --pixel-border: #333;
  --pixel-text: #ffffff;
  --pixel-text-muted: #cccccc;
  --pixel-success: #4ade80;
  --pixel-error: #ef4444;
  --pixel-warning: #fbbf24;
  /* layout */
  --container-max: 1200px;
}

* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}


html,
body {
  max-width: 100vw;
  overflow-x: hidden;
  font-family: var(--font-body), system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, 'Apple Color Emoji', 'Segoe UI Emoji';
  background-color: var(--background);
  color: var(--foreground);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  color: var(--foreground);
  background: linear-gradient(135deg, var(--background) 0%, var(--pixel-darker) 100%);
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

/* 像素导航条 */
.pixel-nav {
  background: linear-gradient(180deg, var(--pixel-darker) 0%, var(--pixel-dark) 100%);
  border-bottom: 2px solid var(--pixel-border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.pixel-nav .nav-inner { max-width: var(--container-max); margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; }
.nav-links { display: none; gap: 16px; }
@media (min-width: 768px) { .nav-links { display: flex; } }
.nav-link { color: var(--pixel-text-muted); font-weight: 600; }
.nav-link:hover { color: var(--pixel-text); text-decoration: underline; text-underline-offset: 3px; }

/* 字体工具类：在需要像素风味时使用 */
.font-pixel { font-family: var(--font-pixel), monospace; image-rendering: pixelated; }
.font-body { font-family: var(--font-body), system-ui; }

/* 统一容器宽度和内边距 */
.app-container { max-width: var(--container-max); margin: 0 auto; padding: 0 16px; }

/* 标题与段落的更合理比例（默认用 body 字体） */
h1, h2, h3, h4 { font-weight: 800; letter-spacing: -0.01em; }
p { color: var(--pixel-text-muted); }

/* 像素按钮样式 */
.pixel-btn {
  display: inline-block;
  padding: 8px 16px;
  background: linear-gradient(135deg, var(--pixel-primary) 0%, var(--pixel-secondary) 100%);
  color: var(--pixel-text);
  border: 2px solid var(--pixel-border);
  font-family: var(--font-pixel), monospace;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.1s ease;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  overflow: hidden;
  image-rendering: pixelated;
}

.pixel-btn:hover {
  background: linear-gradient(135deg, var(--pixel-secondary) 0%, var(--pixel-accent) 100%);
  transform: translate(-1px, -1px);
  box-shadow: 2px 2px 0px var(--pixel-border);
}

.pixel-btn:active {
  transform: translate(0px, 0px);
  box-shadow: 1px 1px 0px var(--pixel-border);
}

.pixel-btn:disabled {
  background: var(--pixel-light);
  color: var(--pixel-text-muted);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* 像素次要按钮样式 - 用于下拉菜单等 */
.pixel-button-secondary {
  background: var(--pixel-light) !important;
  color: var(--pixel-text) !important;
  border: 1px solid var(--pixel-border) !important;
  font-family: var(--font-body) !important;
  font-size: 12px !important;
  transition: all 0.1s ease !important;
  cursor: pointer !important;
  image-rendering: pixelated !important;
}

.pixel-button-secondary:hover {
  background: linear-gradient(135deg, var(--pixel-primary) 0%, var(--pixel-secondary) 100%) !important;
  color: var(--pixel-text) !important;
  transform: translate(-1px, -1px) !important;
  box-shadow: 2px 2px 0px var(--pixel-border) !important;
}

.pixel-button-secondary:active {
  transform: translate(0px, 0px) !important;
  box-shadow: 1px 1px 0px var(--pixel-border) !important;
}

/* 像素卡片样式 */
.pixel-card {
  background: linear-gradient(135deg, var(--pixel-dark) 0%, var(--pixel-light) 100%);
  border: 2px solid var(--pixel-border);
  padding: 16px;
  color: var(--pixel-text);
  position: relative;
  overflow: hidden;
  image-rendering: pixelated;
  border-radius: 6px;
}

.pixel-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--pixel-accent) 50%, transparent 100%);
}

/* 像素输入框样式 */
.pixel-input {
  background: var(--pixel-darker);
  border: 2px solid var(--pixel-border);
  padding: 8px 12px;
  color: var(--pixel-text);
  font-family: var(--font-body);
  font-size: 13px;
  transition: all 0.1s ease;
  image-rendering: pixelated;
}

.pixel-input:focus {
  outline: none;
  border-color: var(--pixel-accent);
  box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.3);
}

.pixel-input::placeholder {
  color: var(--pixel-text-muted);
}

.pixel-input option {
  background: var(--pixel-darker);
  color: var(--pixel-text);
}

/* 像素模态框样式 */
.pixel-modal {
  background: linear-gradient(135deg, var(--pixel-dark) 0%, var(--background) 100%);
  border-left: 3px solid var(--pixel-accent);
  color: var(--pixel-text);
  overflow: hidden;
}

.pixel-modal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, var(--pixel-accent) 0%, var(--pixel-primary) 50%, var(--pixel-secondary) 100%);
  animation: pixelGlow 2s infinite alternate;
}

@keyframes pixelGlow {
  0% { opacity: 0.8; }
  100% { opacity: 1; }
}

/* 像素滚动条 */
::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: var(--pixel-darker);
  border: 1px solid var(--pixel-border);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, var(--pixel-primary) 0%, var(--pixel-secondary) 100%);
  border: 1px solid var(--pixel-border);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, var(--pixel-secondary) 0%, var(--pixel-accent) 100%);
}

::-webkit-scrollbar-corner {
  background: var(--pixel-darker);
}

/* Wallet Adapter 像素风格覆盖 */
.wallet-adapter-button {
  background: linear-gradient(135deg, var(--pixel-primary) 0%, var(--pixel-secondary) 100%) !important;
  border: 2px solid var(--pixel-border) !important;
  color: var(--pixel-text) !important;
  font-family: var(--font-pixel), monospace !important;
  font-size: 10px !important;
  padding: 8px 16px !important;
  border-radius: 0 !important;
  text-transform: uppercase !important;
  letter-spacing: 1px !important;
  transition: all 0.1s ease !important;
  image-rendering: pixelated !important;
}

.wallet-adapter-button:hover {
  background: linear-gradient(135deg, var(--pixel-secondary) 0%, var(--pixel-accent) 100%) !important;
  transform: translate(-1px, -1px) !important;
  box-shadow: 2px 2px 0px var(--pixel-border) !important;
}

.wallet-adapter-button:active {
  transform: translate(0px, 0px) !important;
  box-shadow: 1px 1px 0px var(--pixel-border) !important;
}

/* Wallet Modal Wrapper */
.wallet-adapter-modal-wrapper {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  z-index: 1000 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(0, 0, 0, 0.7) !important;
  padding: 1rem !important;
}

.wallet-adapter-modal-wrapper::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  background: rgba(0, 0, 0, 0.7) !important;
  z-index: -1 !important;
}

/* Revert: modal content relies on wrapper flex centering */
.wallet-adapter-modal-wrapper > * {
  position: relative !important;
  z-index: 1 !important;
  max-width: 400px !important;
  width: 100% !important;
  max-height: 80vh !important;
  overflow-y: auto !important;
  background: var(--pixel-dark) !important;
  border: 2px solid var(--pixel-border) !important;
  border-radius: 0 !important;
  padding: 1.5rem !important;
  font-family: var(--font-body) !important;
  box-sizing: border-box !important;
}

.wallet-adapter-modal-button-close {
  position: absolute !important;
  top: 1rem !important;
  right: 1rem !important;
  background: transparent !important;
  border: none !important;
  color: var(--pixel-text) !important;
  cursor: pointer !important;
  padding: 0.25rem !important;
  z-index: 2 !important;
}

.wallet-adapter-modal-button-close:hover {
  color: var(--pixel-accent) !important;
}

.wallet-adapter-modal-button-close svg {
  fill: currentColor !important;
}

.wallet-adapter-modal {
  background: var(--pixel-dark) !important;
  border: 2px solid var(--pixel-border) !important;
  border-radius: 0 !important;
  font-family: var(--font-body) !important;
}

.wallet-adapter-modal-title {
  color: var(--pixel-text) !important;
  font-family: var(--font-pixel), monospace !important;
  font-size: 14px !important;
  margin: 0 0 1.5rem 0 !important;
  padding-right: 2rem !important;
  line-height: 1.4 !important;
}

.wallet-adapter-modal-list {
  background: transparent !important;
  border: none !important;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.wallet-adapter-modal-list li {
  margin-bottom: 0.5rem !important;
}

.wallet-adapter-modal-list .wallet-adapter-button {
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 0.75rem !important;
  text-align: left !important;
  padding: 0.75rem 1rem !important;
  font-size: 12px !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  background: var(--pixel-light) !important;
  border: 1px solid var(--pixel-border) !important;
}

.wallet-adapter-modal-list .wallet-adapter-button:hover {
  background: linear-gradient(135deg, var(--pixel-primary) 0%, var(--pixel-secondary) 100%) !important;
  transform: translate(-1px, -1px) !important;
  box-shadow: 2px 2px 0px var(--pixel-border) !important;
}

.wallet-adapter-modal-list .wallet-adapter-button:disabled {
  opacity: 0.6 !important;
  cursor: not-allowed !important;
}

.wallet-adapter-button-start-icon {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 20px !important;
  height: 20px !important;
  flex-shrink: 0 !important;
}

.wallet-adapter-button-start-icon img {
  width: 20px !important;
  height: 20px !important;
  border-radius: 4px !important;
}

.wallet-adapter-modal-list .wallet-adapter-button span {
  margin-left: auto !important;
  font-size: 10px !important;
  color: var(--pixel-accent) !important;
  font-weight: normal !important;
}

.wallet-adapter-modal-list-item {
  background: var(--pixel-light) !important;
  border: 1px solid var(--pixel-border) !important;
  border-radius: 0 !important;
  margin: 4px 0 !important;
  color: var(--pixel-text) !important;
  font-family: var(--font-body) !important;
  font-size: 10px !important;
}

.wallet-adapter-modal-list-item:hover {
  background: linear-gradient(135deg, var(--pixel-primary) 0%, var(--pixel-secondary) 100%) !important;
  transform: translate(-1px, -1px) !important;
  box-shadow: 2px 2px 0px var(--pixel-border) !important;
}

/* Toast 像素风格 */
.Toastify__toast {
  background: var(--pixel-dark) !important;
  border: 2px solid var(--pixel-border) !important;
  border-radius: 0 !important;
  color: var(--pixel-text) !important;
  font-family: 'Press Start 2P', monospace !important;
  font-size: 10px !important;
  line-height: 1.4 !important;
}

.Toastify__toast--success {
  border-color: var(--pixel-success) !important;
}

.Toastify__toast--error {
  border-color: var(--pixel-error) !important;
}

.Toastify__toast--warning {
  border-color: var(--pixel-warning) !important;
}

.Toastify__progress-bar {
  background: var(--pixel-accent) !important;
  height: 3px !important;
}

/* 像素装饰元素 */
.pixel-decoration {
  background: repeating-linear-gradient(
    45deg,
    var(--pixel-primary),
    var(--pixel-primary) 2px,
    var(--pixel-secondary) 2px,
    var(--pixel-secondary) 4px
  );
  height: 2px;
  width: 100%;
  image-rendering: pixelated;
  filter: contrast(1.2) saturate(1.3);
}

/* 响应式像素风格 */
@media (max-width: 768px) {
  body { font-size: 13px; }
  
  .pixel-btn {
    font-size: 10px;
    padding: 6px 12px;
  }
  
  .pixel-input { font-size: 12px; padding: 8px; }
}

/* 自定义动画 - Mint 页面 */
@keyframes blob {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(30px, -50px) scale(1.1);
  }
  66% {
    transform: translate(-20px, 20px) scale(0.9);
  }
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.animate-blob {
  animation: blob 7s infinite;
}

.animate-shimmer {
  animation: shimmer 2s infinite;
}

.animation-delay-2000 {
  animation-delay: 2s;
}

.animation-delay-4000 {
  animation-delay: 4s;
}

